package com.spring;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class SpringMain {

    public static void main(String[] args) {
        // ApplicationContext context = new
        // ClassPathXmlApplicationContext("classpath:applicationContext-spring.xml");//
        // 此文件放在SRC目录下

        // SpringBean1 h = (SpringBean1) context.getBean("springBean1");

        ClassPathResource resource = new ClassPathResource("applicationContext-spring.xml");
        BeanFactory factory = new XmlBeanFactory(resource);

        SpringBean1 h = (SpringBean1) factory.getBean("springBean1");
        h.dotestSpringBean();
        
        System.out.println(5.0944*1000);
    }
}
